using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DevExpress.ExpressApp.DC;
using DevExpress.Persistent.Base;
using DevExpress.Persistent.BaseImpl;
using DevExpress.Xpo;
using DevExpress.Persistent.Validation;
namespace Ascent.QiPei.Module.BusinessObjects.Base
{
  [DefaultClassOptions]
  [DevExpress.Persistent.Base.NavigationItemAttribute("基础数据")]
  [DevExpress.ExpressApp.DC.XafDisplayNameAttribute("收支帐类型")]
  public partial class InOutAccountType : DevExpress.Persistent.BaseImpl.BaseObject
  {
    private Ascent.QiPei.Module.BusinessObjects.Finance.InOutAccount _inOutAccount;
    private System.String _remark;
    private System.String _name;
    public InOutAccountType(DevExpress.Xpo.Session session)
      : base(session)
    {
    }
    [DevExpress.ExpressApp.DC.XafDisplayNameAttribute("名称")]
    [RuleRequiredField(DefaultContexts.Save)]
    public System.String Name
    {
      get
      {
        return _name;
      }
      set
      {
        SetPropertyValue("Name", ref _name, value);
      }
    }
    [DevExpress.ExpressApp.DC.XafDisplayNameAttribute("备注")]
    public System.String Remark
    {
      get
      {
        return _remark;
      }
      set
      {
        SetPropertyValue("Remark", ref _remark, value);
      }
    }
    [System.ComponentModel.BrowsableAttribute(false)]
    public Ascent.QiPei.Module.BusinessObjects.Finance.InOutAccount InOutAccount
    {
      get
      {
        return _inOutAccount;
      }
      set
      {
        if (_inOutAccount == value)
          return;
        Ascent.QiPei.Module.BusinessObjects.Finance.InOutAccount prevInOutAccount = _inOutAccount;
        _inOutAccount = value;
        if (IsLoading)
          return;
        if (prevInOutAccount != null && prevInOutAccount.InOutAccountType == this)
          prevInOutAccount.InOutAccountType = null;
        if (_inOutAccount != null)
          _inOutAccount.InOutAccountType = this;
        OnChanged("InOutAccount");
      }
    }
  }
}
